import {createRouter,createWebHashHistory} from "vue-router";
import Home from "../view/Home.vue";

import MSelf from "../view/manager/MSelf.vue"
import USelf from "../view/user/USelf.vue"
import Mmessager from "../view/manager/Mmessage.vue"
import Pmessager from "../view/manager/Pmessage.vue"
import Detail from "../view/product/detail.vue";
import Order from "../view/user/Order.vue"
import Cart from "../view/user/cart.vue"
import Collect from "../view/user/collect.vue"


const routes = [
    {
        path: '/',
        component: Home,
    },
    {
        path: '/manager/MSelf',
        component: MSelf,
        children: [
            {
              path: '/manager/Mmessage',
                component: Mmessager,
            },{
                path: '/manager/Pmessage',
                component: Pmessager,
            }
        ],
    },
    {
        path: '/user/USelf',
        component: USelf
    },
    {
        path: '/product/detail',
        component: Detail
    },
    {
        path: '/user/Order',
        component: Order
    },
    {
        path: '/user/cart',
        component: Cart
    },{
        path: '/user/collect',
        component: Collect
    }
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router